import { createApp } from 'vue'
import App from './App.vue'

import 'ant-design-vue/lib/message/style/index.less'
import 'ant-design-vue/lib/notification/style/index.less'

import router from './router'
import { key, store, useStore } from './store/store'
import '@/assets/css/index.less'
import './permission'
import Vue3Storage, { StorageType } from 'vue3-storage'

const app = createApp(App)
  .use(store, key)
  .use(router)
  .use(Vue3Storage, {
    namespace: 'jypj_',
    storage: StorageType.Local
  })

app.mount('#app')

app.config.globalProperties.$filters = {
  dictText (value: string, dicType: string) {
    const store = useStore()
    return store.getters.dictText(dicType, value)
  }
}
